import matplotlib.pyplot as plt
import pandas as pd

plt.rcParams['font.sans-serif'] = ['SimHei'] #解决出现的中文字符不匹配的问题

path = "rawdata2020122602.csv"
df = pd.read_csv(path)

words = []
for index, row in df.iterrows():
    row_data = row["data"]
    words.append(len(row_data.split()))


plt.tick_params(labelsize=20)
plt.hist(words, bins=80, range=(0,1000), color='darkgrey', histtype='bar')
plt.show()
